-- GENERATED SPELL FOR [Eye of C'Thun] --


function spell0_15589(pUnit, Event) --@Eye Beam,n/a--
pUnit:FullCastSpellOnTarget(26134,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15589', 2000, 1)
end

function spell1_15589(pUnit, Event) --@Eye Beam,n/a--
pUnit:FullCastSpellOnTarget(32950,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15589', 2000, 1)
end

function Sorts_15589(pUnit, Event)
local choix_sorts_15589 = math.random(0, 1)
if choix_sorts_15589 == 0 then
pUnit:RegisterEvent('spell0_15589', 1, 1)
end
if choix_sorts_15589 == 1 then
pUnit:RegisterEvent('spell1_15589', 1, 1)
end
end

function mob15589_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_15589', math.random(1500, 3000), 1)
end

function mob15589_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15589_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15589_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(15589, 1, 'mob15589_Action')
RegisterUnitEvent(15589, 2, 'mob15589_Leave')
RegisterUnitEvent(15589, 3, 'mob15589_Kill')
RegisterUnitEvent(15589, 4, 'mob15589_Die')
